-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SPSite: Fix: SPSite Constructur returns $null when run as Ressource on SPSE #1443
Conversation
The unit tests are failing for SPSE. Can you please fix those, so this PR can be merged and I can release a new version with both your fixes? |
Hello, sorry for the late reply. I'll work on this next week. Thanks you |
The site doesn't exist yet and should: Mock for Get-SPSite on SPSE returns the correct values The site exists, but doesn't have default groups configured: Add test parameter "CreateDefaultsGroups" so the Test-TargetResource does test for default groups
Hi @ykuijs i've added a Parameter SharePointDsc/tests/Unit/SharePointDsc/SharePointDsc.SPSite.Tests.ps1 Lines 349 to 354 in e039c98
to honor the intention of the Test-TargetRessource Function: SharePointDsc/SharePointDsc/DSCResources/MSFT_SPSite/MSFT_SPSite.psm1 Lines 542 to 545 in e039c98
The function only tests for the default groups if the parameter is used. Previously the test was successfull because the URL Property between the $testParams and the $CurrentValues is different. Which might be a missing Mock of Since the Parameter SharePointDsc/SharePointDsc/DSCResources/MSFT_SPSite/MSFT_SPSite.psm1 Lines 542 to 545 in e039c98
to if ($CreateDefaultGroups -eq $true)
{
if ($CurrentValues.CreateDefaultGroups -ne $true) |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1443 +/- ##
======================================
Coverage 84% 84%
======================================
Files 145 145
Lines 22809 22812 +3
======================================
+ Hits 19244 19253 +9
+ Misses 3565 3559 -6
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Pull Request (PR) description
The Get Method failed to get an existing Site Collection on SharePoint Server Subscription Edition
This Pull Request (PR) fixes the following issues
Task list
Entry should say what was changed and how that affects users (if applicable), and
reference the issue being resolved (if applicable).
help.
This change is